package co.edu.udem.service;

import org.codehaus.jettison.json.JSONException;
import org.codehaus.jettison.json.JSONObject;


/**
 * Contains all the possible values for a request
 * 
 * @author sgranada.
 * 
 */
public class ServiceResponse {

	/** the userName */
	private String userName;

	/** the user password */
	private String password;
	
	/** the user type.*/
	private String userType;
	
	/** User type description.*/
	private String userTypeDescription;

	/** the service response code */
	private String responseCode;

	/** the service response description */
	private String responseDescription;

	/** the session code */
	private String sessionId;
	
  /**
   * 
   * GetJSON responseValues
   * 
   * @return JSONObject
   * @throws JSONException 
   */
  public JSONObject getJSONServicesResponse() throws JSONException {

    JSONObject responseObj = new JSONObject();
    responseObj.put("crt", this.responseCode);
    responseObj.put("drt", this.responseDescription);
    responseObj.put("sid", this.sessionId);
    responseObj.put("na", this.userName);
    responseObj.put("ut", this.userType);
    responseObj.put("utd", this.userTypeDescription);

    return responseObj;
  }


	/**
	 * Method that return the value
	 * 
	 * @return the userName.
	 */
	public String getUserName() {
		return userName;
	}

	/**
	 * Method that set value.
	 * 
	 * @param userName
	 *            the userName to set.
	 */
	public void setUserName(String userName) {
		this.userName = userName;
	}

	/**
	 * Method that return the value
	 * 
	 * @return the password.
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * Method that set value.
	 * 
	 * @param password
	 *            the password to set.
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	/**
	 * Method that return the value
	 * 
	 * @return the responseDescription.
	 */
	public String getResponseDescription() {
		return responseDescription;
	}

	/**
	 * Method that set value.
	 * 
	 * @param responseDescription
	 *            the responseDescription to set.
	 */
	public void setResponseDescription(String responseDescription) {
		this.responseDescription = responseDescription;
	}

	/**
	 * Method that return the value
	 * 
	 * @return the sessionId.
	 */
	public String getSessionId() {
		return sessionId;
	}

	/**
	 * Method that set value.
	 * 
	 * @param sessionId
	 *            the sessionId to set.
	 */
	public void setSessionId(String sessionId) {
		this.sessionId = sessionId;
	}


	/**
	 * Method that return the value
	 * 
	 * @return the responseCode.
	 */
	public String getResponseCode() {
		return responseCode;
	}

	/**
	 * Method that set value.
	 * 
	 * @param responseCode
	 *            the responseCode to set.
	 */
	public void setResponseCode(String responseCode) {
		this.responseCode = responseCode;
	}


  /**
   * @return the userType
   */
  public String getUserType() {
    return userType;
  }


  /**
   * @param userType the userType to set
   */
  public void setUserType(String userType) {
    this.userType = userType;
  }


  /**
   * @return the userTypeDescription
   */
  public String getUserTypeDescription() {
    return userTypeDescription;
  }


  /**
   * @param userTypeDescription the userTypeDescription to set
   */
  public void setUserTypeDescription(String userTypeDescription) {
    this.userTypeDescription = userTypeDescription;
  }

}
